import 'package:flutter_test/flutter_test.dart';
import 'package:kq_flutter_core_widget/kq_flutter_core_widget.dart';
import 'package:kq_flutter_core_widget/kq_flutter_core_widget_platform_interface.dart';
import 'package:kq_flutter_core_widget/kq_flutter_core_widget_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockKqFlutterCoreWidgetPlatform
    with MockPlatformInterfaceMixin
    implements KqFlutterCoreWidgetPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final KqFlutterCoreWidgetPlatform initialPlatform = KqFlutterCoreWidgetPlatform.instance;

  test('$MethodChannelKqFlutterCoreWidget is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelKqFlutterCoreWidget>());
  });

  test('getPlatformVersion', () async {
    KqFlutterCoreWidget kqFlutterCoreWidgetPlugin = KqFlutterCoreWidget();
    MockKqFlutterCoreWidgetPlatform fakePlatform = MockKqFlutterCoreWidgetPlatform();
    KqFlutterCoreWidgetPlatform.instance = fakePlatform;

    expect(await kqFlutterCoreWidgetPlugin.getPlatformVersion(), '42');
  });
}
